Optimal. Leaf size=56 \[ \frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sin (x)}{b^2}-\frac {\sin ^3(x)}{3 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3265, 398, 214}
\begin {gather*} \frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sin (x)}{b^2}-\frac {\sin ^3(x)}{3 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 398
Rule 3265
Rubi steps
\begin {align*} \int \frac {\cos ^5(x)}{a+b \cos ^2(x)} \, dx &=\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{a+b-b x^2} \, dx,x,\sin (x)\right )\\ &=\text {Subst}\left (\int \left (-\frac {a-b}{b^2}-\frac {x^2}{b}+\frac {a^2}{b^2 \left (a+b-b x^2\right )}\right ) \, dx,x,\sin (x)\right )\\ &=-\frac {(a-b) \sin (x)}{b^2}-\frac {\sin ^3(x)}{3 b}+\frac {a^2 \text {Subst}\left (\int \frac {1}{a+b-b x^2} \, dx,x,\sin (x)\right )}{b^2}\\ &=\frac {a^2 \tanh ^{-1}\left (\frac {\sqrt {b} \sin (x)}{\sqrt {a+b}}\right )}{b^{5/2} \sqrt {a+b}}-\frac {(a-b) \sin (x)}{b^2}-\frac {\sin ^3(x)}{3 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 86, normalized size = 1.54 \begin {gather*} \frac {\frac {6 a^2 \left (-\log \left (\sqrt {a+b}-\sqrt {b} \sin (x)\right )+\log \left (\sqrt {a+b}+\sqrt {b} \sin (x)\right )\right )}{\sqrt {a+b}}+3 \sqrt {b} (-4 a+3 b) \sin (x)+b^{3/2} \sin (3 x)}{12 b^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 50, normalized size = 0.89
method | result | size |
default | \(-\frac {\frac {b \left (\sin ^{3}\left (x \right )\right )}{3}+\sin \left (x \right ) a -\sin \left (x \right ) b}{b^{2}}+\frac {a^{2} \arctanh \left (\frac {b \sin \left (x \right )}{\sqrt {\left (a +b \right ) b}}\right )}{b^{2} \sqrt {\left (a +b \right ) b}}\) | \(50\) |
risch | \(\frac {i {\mathrm e}^{i x} a}{2 b^{2}}-\frac {3 i {\mathrm e}^{i x}}{8 b}-\frac {i {\mathrm e}^{-i x} a}{2 b^{2}}+\frac {3 i {\mathrm e}^{-i x}}{8 b}+\frac {a^{2} \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \left (a +b \right ) {\mathrm e}^{i x}}{\sqrt {a b +b^{2}}}-1\right )}{2 \sqrt {a b +b^{2}}\, b^{2}}-\frac {a^{2} \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \left (a +b \right ) {\mathrm e}^{i x}}{\sqrt {a b +b^{2}}}-1\right )}{2 \sqrt {a b +b^{2}}\, b^{2}}+\frac {\sin \left (3 x \right )}{12 b}\) | \(147\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 67, normalized size = 1.20 \begin {gather*} -\frac {a^{2} \log \left (\frac {b \sin \left (x\right ) - \sqrt {{\left (a + b\right )} b}}{b \sin \left (x\right ) + \sqrt {{\left (a + b\right )} b}}\right )}{2 \, \sqrt {{\left (a + b\right )} b} b^{2}} - \frac {b \sin \left (x\right )^{3} + 3 \, {\left (a - b\right )} \sin \left (x\right )}{3 \, b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.46, size = 191, normalized size = 3.41 \begin {gather*} \left [\frac {3 \, \sqrt {a b + b^{2}} a^{2} \log \left (-\frac {b \cos \left (x\right )^{2} - 2 \, \sqrt {a b + b^{2}} \sin \left (x\right ) - a - 2 \, b}{b \cos \left (x\right )^{2} + a}\right ) - 2 \, {\left (3 \, a^{2} b + a b^{2} - 2 \, b^{3} - {\left (a b^{2} + b^{3}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{6 \, {\left (a b^{3} + b^{4}\right )}}, -\frac {3 \, \sqrt {-a b - b^{2}} a^{2} \arctan \left (\frac {\sqrt {-a b - b^{2}} \sin \left (x\right )}{a + b}\right ) + {\left (3 \, a^{2} b + a b^{2} - 2 \, b^{3} - {\left (a b^{2} + b^{3}\right )} \cos \left (x\right )^{2}\right )} \sin \left (x\right )}{3 \, {\left (a b^{3} + b^{4}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 65, normalized size = 1.16 \begin {gather*} -\frac {a^{2} \arctan \left (\frac {b \sin \left (x\right )}{\sqrt {-a b - b^{2}}}\right )}{\sqrt {-a b - b^{2}} b^{2}} - \frac {b^{2} \sin \left (x\right )^{3} + 3 \, a b \sin \left (x\right ) - 3 \, b^{2} \sin \left (x\right )}{3 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.31, size = 51, normalized size = 0.91 \begin {gather*} \frac {a^2\,\mathrm {atanh}\left (\frac {\sqrt {b}\,\sin \left (x\right )}{\sqrt {a+b}}\right )}{b^{5/2}\,\sqrt {a+b}}-\frac {{\sin \left (x\right )}^3}{3\,b}-\sin \left (x\right )\,\left (\frac {a+b}{b^2}-\frac {2}{b}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________